<template>
  <view class="goodsInfo">
    <view class="goodsInfo-swiper">
      <u-swiper :list="swiperList" indicator indicatorStyle="right" circular height="200"
        indicatorMode="dot"></u-swiper>
    </view>
    <view class="goodsInfo-content">
      <p style="text-align: center;margin-bottom:40rpx;font-size:28rpx;">{{goodsInfo.ProductName}}</p>
      <div style="  display: flex; justify-content: center; align-items: center;margin-bottom:40rpx; color:#B98B51;">
          <p >￥</p>
          <p style="font-size:50rpx; font-weight: bold;">{{goodsInfo.Price}}</p>
      </div>
      <p style="text-align: center;margin-bottom:40rpx;font-size:28rpx;">榴芒一刻|多口味冰棕54克*4枚/盒  订购</p>
      <!-- <u-parse :content="content"></u-parse> -->
    </view>
  </view>
</template>

<script>
  export default {
    data() {
      return {
        goodsId: -1,
        goodsInfo:{},
        swiperList: [
          'https://cdn.uviewui.com/uview/swiper/swiper1.png',
          'https://cdn.uviewui.com/uview/swiper/swiper2.png',
          'https://cdn.uviewui.com/uview/swiper/swiper3.png',
        ],
        content: `
                   <img src="https://cdn.uviewui.com/uview/swiper/2.jpg" />
        		`
      }
    },
    onLoad(e) {
      console.log('id', e)
      this.goodsId=e.id
      this.GetGoodsInfo()
    },
    methods: {
      async GetGoodsInfo() {
        let res = await this.$api.post('Products/Detail', {
          ID: this.goodsId
        });
        this.goodsInfo=res.data || {}
        console.log('商品详细', res)
      },
    }
  }
</script>

<style lang="scss" scoped>
  .goodsInfo {
    &-content {
      padding: 40rpx;
    }
  }
</style>